﻿#ifndef FACEPROJECT_H
#define FACEPROJECT_H

#include <QMainWindow>

#include <opencv2/opencv.hpp>
#include <opencv2/face.hpp>

using namespace  cv;
using namespace  cv::face;

struct staffinfo
{
    QString name;
    int faceID;
    QString picterpath;
    QString time;
    int mtime;
};

namespace Ui {
class faceProject;
}

class faceProject : public QMainWindow
{
    Q_OBJECT

public:
    explicit faceProject(QWidget *parent = nullptr);
    ~faceProject();
     void timerEvent(QTimerEvent* e);

private slots:

    void on_collectbt_clicked();

    void on_usrbt_clicked();

    void on_querybt_clicked();

private:
    Ui::faceProject *ui;
    Mat face;//保存人脸
    VideoCapture cap;
    CascadeClassifier cascade;//定义分类器-检测人脸
    staffinfo info;
};

#endif // FACEPROJECT_H
